::-------------------------------------------------------------------------------------------------------------------
:: LiveResult provided by picoTIMING.ch 
:: Upload-Datei 
::
:: Kurzanleitung: 
:: Dieses bat richtig einstellen (set event --> ORware WKname)
:: ORclient mit Server verbinden und Resultatdatei auf C: exportieren (unter Service)
:: Falls Upload-Client nicht der Server ist: Pfad Origin2 anpassen!!
::-------------------------------------------------------------------------------------------------------------------

@echo off

:: change the following line to the ORserver event name (directory name)
set event=6TAGEZO2015DAY6
set origin=C:\
set origin2=D:\picOR\ORserver\SEevent\%event%\SEoutput\
::set origin2=\\NB239\D\picOR\ORserver\SEevent\%event%\SEoutput\


:: let this as it is
set url=https://pico-timing.googlecode.com/svn/trunk/
set repo=pico-timing
set file=%event%_BasicResults-1.csv
set file2=DBOResDataSingle-1.ore
set remotefile=%event%.csv
set remotefile2=%event%.ore
set interval=20

set usr=picotiming@gmail.com
set pw=jJ8nJ4SE3cY2

set remotePath=%url%

cd ..
svn checkout %remotePath% %repo% --username %usr% --password %pw%
cd %repo%
copy /Y "%origin%%file%" "%remotefile%" 
copy /Y "%origin2%%file2%" "%remotefile2%" 
svn add %remotefile%
svn add %remotefile2%

:Start
copy /Y "%origin%%file%" "%remotefile%"
copy /Y "%origin2%%file2%" "%remotefile2%"

svn commit -m "UpdateRanking_%event%@%Time%" %remotefile% %remotefile2% --username %usr% --password %pw%

ping -n %interval% 127.0.0.1>nul
GOTO :Start